﻿namespace Renci.Data.Interop.OpenGIS.Gml.Common
{
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public class MinutesType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlTextAttribute(DataType = "nonNegativeInteger")]
        public string Value { get; set; }

        /// <remarks/>
        public static implicit operator MinutesType(int d)
        {
            return new MinutesType() { Value = d.ToString(System.Globalization.CultureInfo.InvariantCulture) };
        }

        /// <remarks/>
        public static implicit operator int(MinutesType c)
        {
            return int.Parse(c.Value, System.Globalization.CultureInfo.InvariantCulture);
        }

        /// <summary>
        /// Converts to <see cref="MinutesType"/> type.
        /// </summary>
        /// <param name="d">Value to convert.</param>
        /// <returns></returns>
        public static MinutesType ToMinutesType(int d)
        {
            return (MinutesType)d;
        }

        /// <summary>
        /// Converts from <see cref="MinutesType"/> type.
        /// </summary>
        /// <param name="c">Value to convert.</param>
        /// <returns></returns>
        public static int FromMinutesType(MinutesType c)
        {
            return (int)c;
        }
    }
}
